﻿//新增
var fnCustomAdd = function () {
    var pagetitle = "新增最低薪资";
    //parent._employeeTitle = pagetitle;
    parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&flag=add" ));
}

//修改
var fnCustomEdit = function () {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    if (record == null) {
        alert("请选择一条记录");
        return;
    }
    var pagetitle = "修改最低薪资" + record._oData["City"];
    //parent._employeeTitle = pagetitle;
    parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&flag=edit" + "&id=" + record.getData(const_entityID) ));
    //parent.NeedRefreshPage = this;
}

var fnSetPost = function () {
    //debugger
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    var CityLowerestSalaryID = record.getData("ID");
    //conditonId = "UserID";
    var selectId = "PostID";
    var condition = "CityLowerestSalaryID='" + CityLowerestSalaryID + "'";
    var _btn = document.getElementById("yui-gen7-button");
    if (_btn != null && _btn != undefined) {
        _btn.style.display = "none";
    }
    document.getElementById("EditUIWindow").src = "/Extend/ViewList.aspx?entity=V_salPostCityLowerestSalary&CityID=" + CityLowerestSalaryID + "&condition=" + condition;
    document.getElementById("yui-gen7-button").style.display = "none";
    YAHOO.example.container.dialog1.show();
}

var SelectData = function() {
    alert($(this).attr("SValue"));
}